package com.hzspace.elasticsearch.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


/**
 * TODO
 *
 * @Version 1.0
 * @Author hz
 * @Date 2020/11/25 18:01
 */
@Document(indexName = "test", indexStoreType = "_doc")
@Data
public class Article {

    @Id
    private Integer id;
    @Field(analyzer = "ik_smart", type = FieldType.Text)
    private String title;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String content;
}
